# 字符串 列表 元祖 字典的遍历
a_str = "hello itcast"
for char in a_str:
    print(char,end =' ')
a_list = [1,2,3,4,5,6]
print()
for num in a_list:
    print(num,end = ' ')
print()
a_turple = (1,2,3,4,5,6)
for num in a_turple:
    print(num,end = ' ')

print()

info = {'name':'班长', 'id':100, 'sex':'f', 'address':'地球亚洲中国北京'}
for key in info.keys():
    print(key,end = ' ')

print()


for value in info.values():
    print(value,end = ' ')

print()

for item in info.items():
    print(item,end = ' ')

print()

for key,value in info.items():
    print("key = %s,value = %s"%(key,value))

chars = ['a', 'b', 'c', 'd']
for i,char in enumerate(chars):
    print(i,char)
